set iverilog_path=C:\iverilog\bin;
set gtkwave_path=C:\iverilog\gtkwave\bin;
set path=%iverilog_path%%gtkwave_path%%path%

del *.vvp
del *.bin

set keil_project=%1

hex2bin.exe ..\keil_c\%keil_project%\Objects\%keil_project%.hex
copy ..\keil_c\%keil_project%\Objects\%keil_project%.bin ..\sim\

iverilog -o ..\sim\tb.vvp -y ..\rtl\ -I ..\rtl\ ..\sim\tb.v
vvp -n ..\sim\tb.vvp
